package stream;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @Description
 * @Author SHEN
 * @Date 2021/1/14
 */
public class StreamDemo {

    public static void main(String[] args) {

        /*List<Person> list = new ArrayList<>();
        list.add(new Person("a",22,"男"));
        list.add(new Person("b",23,"女"));
        list.add(new Person("c",24,"女"));
        list.add(new Person("d",25,"男"));
        list.add(new Person("e",26,"男"));
        list.add(new Person("f",27,"女"));


        List<Person> collect = list.stream()
                .filter((t) -> t.getAge() > 24)
                .filter((t) -> t.getSex().equals("男"))
                .map((t) -> {
                    t.setName(t.getName().toUpperCase());
                    return t;
                }).sorted((t1, t2) -> t2.getName().compareTo(t1.getName()))
                .limit(1L)
                .collect(Collectors.toList());

        System.out.println(collect);*/

        Integer aa = new Integer(123);

        Set<Long> set = new HashSet<>();


        Long[] longs = set.toArray(new Long[set.size()]);


        System.out.println(aa.toString());


    }




}
